<body id="bookikipage" class="bookikipage" style="font-size:16px;" >
<div class="body_agent">
<div id="book_header">
     <h1><a href="<?=base_url()?>">
    <img alt=""  src="<?=base_url()?>images/bookiki.gif"></a>
     </h1>
     <div id="choose_school">
        <?php
        $schoolname=$this->session->userdata('schoolname');
        if($schoolname!=null){
           if(mb_strlen($schoolname)<=4)
             echo $schoolname;
           else{
              if(mb_strlen($schoolname)>8)
                $schoolname=mb_substr($schoolname,0,8,"UTF-8");
              echo "<font size=4>".$schoolname."</font>";
           }
        }
        else{
           echo "浙江大学";
        }
        ?>
        <a href="<?=site_url()?>/user/change_school">切换学校</a>
     </div>
   <div id="header_main">
    <div id="book_search">
    <form id="book_search_form"   method="get" action="<?php echo  site_url('bookiki/search');?>" method="get" >
    <?
	    if(isset($_GET['inputString']))
	    {
		$query=$_GET['inputString'];
		for($i=0;$i<strlen($query);$i++)
		{
		    if($query{$i}=='\''||$query{$i}=='"'||$query{$i}=='<'||$query{$i}=='>'||$query{$i}=='='||
		       $query{$i}=='/'||$query{$i}=='\\'||$query{$i}=='{'||$query{$i}=='}')

            $query{$i}=' ';
		}
		$_GET['inputString']=$query;
		echo("<input type=\"text\" name=\"inputString\" id=\"inputString\"   maxlength=\"2048\" size=\"45\"
		      title=\"Bookiki Search\" value=\"".$_GET['inputString']."\"
		      onclick=\"if(this.value=='输入ISBN，书名或作者'){this.value=''}\" />");
	    }
	    else if(isset($_GET['inputStringBottom']))
	    {
		$query=$_GET['inputStringBottom'];
		for($i=0;$i<strlen($query);$i++)
		{
		    if($query{$i}=='\''||$query{$i}=='"'||$query{$i}=='<'||$query{$i}=='>'||$query{$i}=='='||
		       $query{$i}=='/'||$query{$i}=='\\'||$query{$i}=='{'||$query{$i}=='}')
		    {
			$query{$i}=' ';
		    }
		}
		$_GET['inputStringBottom']=$query;
		echo("<input type=\"text\" name=\"inputString\" id=\"inputString\" maxlength=\"2048\" size=\"45\"
		      title=\"Bookiki Search\" value=\"".$_GET['inputStringBottom']."\"
		      onclick=\"if(this.value=='输入ISBN，书名或作者'){this.value=''}\" />");
	    }
	    else
	    {
		echo("<input type=\"text\" name=\"inputString\" id=\"inputString\" maxlength=\"2048\" size=\"45\"
		      title=\"Bookiki Search\" value=\"输入ISBN，书名或作者\"
		      onclick=\"if(this.value=='输入ISBN，书名或作者'){this.value=''}\" />");
	    }
	?>
    <script>document.all.inputString.focus();</script>
    <input type="hidden" tabindex="2" name="curpage" value="0">
    <input type="submit" tabindex="2" value="搜索图书">
    <a href="<?=site_url()?>/bookiki/advancedSearchInput">高级</a>
    </form>
    </div>

    <div id="site_tabs_container"><ul>
    <?php
    if($activetab==null) $activetab="none";
    if($activetab=="home"){?>
       <li class="site_tab_active"><a href="<?=base_url()?>">首页</a></li>
    <?php
    }
    else{?>
        <li class="site_tab_normal"><a href="<?=base_url()?>">首页</a></li>
    <?php
     }?>

     <?php
    if($activetab=="rank"){?>
       <li class="site_tab_active"><a href="<?=site_url()?>/rank/hotbook">排行榜</a></li>
    <?php
    }
    else{?>
        <li class="site_tab_normal"><a href="<?=site_url()?>/rank/hotbook">排行榜</a></li>
    <?php
     }?>

    <?php
    if($activetab=="automatch"){?>
       <li class="site_tab_active"><a href="<?=site_url()?>/bookiki/automatch">书单匹配</a></li>
    <?php
    }
    else{?>
        <li class="site_tab_normal"><a href="<?=site_url()?>/bookiki/automatch">书单匹配</a></li>
    <?php
     }?>

      <?php
    if($activetab=="bookshop"){?>
       <li class="site_tab_active"><a href="<?=site_url()?>/bookiki/bookshop">逛书店</a></li>
    <?php
    }
    else{?>
        <li class="site_tab_normal"><a href="<?=site_url()?>/bookiki/bookshop">逛书店</a></li>
    <?php
     }?>

    <?php
    if($activetab=="myshop"){?>
       <li class="site_tab_active"><a href="<?=site_url()?>/user/my_salepost">我的书店</a></li>
    <?php
    }
    else{?>
        <li class="site_tab_normal"><a href="<?=site_url()?>/user/my_salepost">我的书店</a></li>
    <?php
     }?>

     </ul></div>
   </div><!--header_main-->
   <div id=userstatus>
        <?=$user_status?>
   </div>
</div><!--book_header-->
